calendar: Handle invalid dates
authorEmmanuele Bassi <ebassi@gnome.org>
Fri, 2 Jan 2015 23:05:29 +0000 (23:05 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Fri, 2 Jan 2015 23:15:55 +0000 (23:15 +0000)
commitb46fdb2d13a072bd9d91c316cae3e9139ea512b5
treeb7543b889edb335f686d7d8376ca33ed48888b4d
parent21360a453c0b0c124b95de4a500c120432f214ca
calendar: Handle invalid dates

GtkCalendar can have an invalid date — mostly at initialization. This
means that GDateTime construction may fail. We need to handle that case
gracefully, like the old code did.

This fixes the `notify` test suite, which started failing with:

/Notification/GtkCalendar:
GLib-CRITICAL **: g_date_time_get_day_of_week: assertion 'datetime != NULL' failed

inside the Continuous builder.
gtk/gtkcalendar.c